#include "AABB.h"
#include <Windows.h>

typedef IAABB* (__stdcall *PFCREATEAABB)();  

PFCREATEAABB pCreateAABB = NULL;

IAABB* CreateAABB()
{
	static HMODULE aabbHandle = 0;
	if(aabbHandle == 0)
		aabbHandle = LoadLibrary("aabbdll.dll");

	if (aabbHandle != 0)
	{
		pCreateAABB = (PFCREATEAABB)GetProcAddress(aabbHandle, "CreateAABB");
		return pCreateAABB();
	}else
		return NULL;
}